package com.sdry.mapper.cb;

import com.sdry.model.cb.DicEntity;
import com.sdry.model.lz.Customer;
import com.sdry.model.lz.Warehouse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IDicMapper {


    List<DicEntity> queryAll();

    List<DicEntity> getNameByType(@Param("sys_ware_layer") String sys_ware_layer);

    //仓库
    @Select("select id , warehouse_name warehouse_name from lz_warehouse where status = 0")
    List<Warehouse> getWarehouseList();

    //所有的客户信息
    @Select("select id,customer_name from lz_customer")
    List<Customer> getCustomerList();

    //所有的客户信息
    @Select("select top 1customer_name from lz_materiel ma , lz_customer cu where ma.customer_id = cu.id and ma.id = #{mid}")
    String getCustomerBymaId(Long mid);
}
